import { defineConfig } from 'unocss'
import presetAttributify from '@unocss/preset-attributify'
import presetUno from '@unocss/preset-uno'
import transformerDirectives from '@unocss/transformer-directives'
import presetIcons from '@unocss/preset-icons'
import presetPxToVw from 'unocss-preset-px-to-vw'
import presetRemToVw from 'unocss-preset-rem-to-vw'

export default defineConfig({
  presets: [
    presetUno(),
    presetAttributify(),
    presetIcons(),
    presetRemToVw({ baseWidth: 1920, unitPrecision: 6 }) as any,
    presetPxToVw({
      viewportWidth: 1920
    }) as any
  ],
  transformers: [transformerDirectives()], // 支持apply
  shortcuts: [['iconify', 'inline-block w-6 h-6 align-middle text-current']]
})
